﻿using System.ComponentModel.DataAnnotations;

namespace HengTong.Model.Request;

public class ChangePhoneNumberRequest
{
    [Required(ErrorMessage = "原手机号不能为空")]
    [Display(Name = "原手机号")]
    [RegularExpression(@"^1\d{10}$", ErrorMessage = "原手机号格式不正确")]
    public string OldPhone { get; set; }

    [Required(ErrorMessage = "新手机号不能为空")]
    [RegularExpression(@"^1\d{10}$", ErrorMessage = "手机号格式不正确")]
    public string Mobile { get; set; }
    
    [Required]
    [RegularExpression(@"^\d{6}$", ErrorMessage = "验证码格式不正确")]
    public string Code { get; set; }
}